package b_lambda;

//lambda的使用
public class LambdaDemo01 {
    public static void main(String[] args) {
        //匿名内部类实现接口
        Swimming s = new Swimming() {
            @Override
            public void swin() {
                System.out.println("学生学蛙泳~~~");
            }
        };
        s.swin();


        //lambda表达式实现接口 () -> {}
        Swimming s1 = () -> {
            System.out.println("学生学仰泳");
        };
        s1.swin();
    }
}
